﻿//获取数据请求
StratConsultationDataJsRequest = new function(){
	this.scriptid ="StratConsultationDataJsRequest";
	this.url = ""; 

	this.CreateLink = function()
	{
		var request = this.url;
		return request;
	}	
	this.Request = function()
	{
		Common.AppendDataArray(this.scriptid,this.CreateLink());
	}
}


//显示数据
StratConsultationDataPaging = new function(){
	this.dataArray;
	this.divName = "ConsultationData_ID";
	this.GetDate = function(array)
	{
		this.dataArray = array;
		this.NewLoadDataFinish();
	}
	this.NewLoadDataFinish = function()
	{
		var hc = new Array();
		hc.push('<div class="zx_xts"><h3>提问小贴士：</h3><p>策略师所发观点和回答问题，仅代表个人观点。策略海不对策略师陈述、观点判断所包含内容的准确性、可靠性或完整性提供任何明示或暗示的保证。<strong class="redcolor">市场有风险，投资需谨慎</strong>。所有策略师不提供代客理财或qq咨询等非法业务。有私下进行收费咨询或付费服务的均属非法个人行为，与策略海无关，请各位用户务必不要上当受骗!</p></div>');
		hc.push('<div class="srpj mt10"><p style="line-height: 30px;"><strong class="red f14">我要提问：</strong></p><textarea id="status"></textarea><p><input type="button" value="提 交" onclick="addConsultation()" class="tj_sd"></p></div>');
		if(this.dataArray.length ==0){
		    Common.$(this.divName).innerHTML = hc.join('');
		 return;
		}
		for(var i=0;i < this.dataArray.length;i++)
		{
		    if(this.dataArray[i].list.length==0)
		    {
		        hc.push('<div class="huid">');
		        hc.push('<div class="tw">');
		        hc.push('<div class="fl tx1"><img width="40" height="40" src="'+ this.dataArray[i].cLogo +'"></div>');
		        hc.push('<div class="fl twhd ml10">');
		        hc.push('<p><strong style="color:#F30">提问：</strong>'+ this.dataArray[i].cComment +'</p><p class="hui1">'+ this.dataArray[i].cUserName +'   提问时间：'+ this.dataArray[i].cTime +' </p>');
		        hc.push('</div></div></div>');
		    }else{
		        hc.push('<div class="huid">');
		        hc.push('<div class="tw tw_1">');
		        hc.push('<div class="fl tx1"><img width="40" height="40" src="'+ this.dataArray[i].cLogo +'"></div>');
		        hc.push('<div class="fl twhd ml10">');
		        hc.push('<p><strong style="color:#F30">提问：</strong>'+ this.dataArray[i].cComment +'</p><p class="hui1">'+ this.dataArray[i].cUserName +'   提问时间：'+ this.dataArray[i].cTime +' </p>');
		        hc.push('</div></div> ');
		        for(var j=0;j<this.dataArray[i].list.length;j++)
		        {
		            hc.push('<div class="tw hd mt10 p5">');
		            hc.push('<div class="fl tx1"><img width="40" height="40" src="'+ this.dataArray[i].list[j].stratgesLogo +'"></div>');
		            hc.push('<div class="fl twhd ml10"><p>');
		            hc.push('<strong class="redcolor">回答：</strong>'+ this.dataArray[i].list[j].reComment +'</p><p class="hui1"><strong><a class="redcolor" target="_blank" href="https://c.hexun.com/stratdetail_tag.aspx?sid='+ this.dataArray[i].list[j].reStratID +'">'+ this.dataArray[i].list[j].reStratName +'</a> </strong>  回答时间：'+ this.dataArray[i].list[j].reTime +' </p>');
		            hc.push('</div></div>');
		        }
		        hc.push('</div>');
		    }
		    
		}
		
		hc.push('<a href="m_d_clzx.aspx?sid='+jsSid+'&author='+jsAuthor+'" style="width: 100%; margin-top: 10px;" class="butt">查看更多咨询</a>');
		Common.$(this.divName).innerHTML = hc.join('');
		//NewAllSetPage('ConsultationSetPage','Consultation_page',document.getElementById("hideConsultationPageId").value,this.dataArray[0].totalPage);
	}
}




